package com.example.myone;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

public class GuideActivity extends AppCompatActivity {

    /**
     * 引导页
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        //隔一秒进入欢迎页
        /*new Handler(new Handler.Callback() {
            @Override
            public boolean handleMessage(Message message) {

                startActivity(new Intent(GuideActivity.this, WelcomeActivity.class));

                return false;
            }
        }).sendEmptyMessageDelayed(0, 1000);*/

    }
    //点击跳转到主页
    public void gohome(View v)
    {

        SharedPreferences sharedPreferences=getSharedPreferences("keytwo",MODE_PRIVATE);
        SharedPreferences.Editor editor=sharedPreferences.edit();
        editor.putBoolean("name",true);
        editor.commit();
        startActivity(new Intent(GuideActivity.this,WelcomeActivity.class));
    }


}
